﻿@namespace SE.PO.CInterface.Web.Pages.DB.Device
@using SE.PO.CInterface.Web.Utils
@using SE.PO.CInterface.Web.Clients
@inject DeviceClient Client
@using SE.PO.CInterface.Web.Pages.DB.Components
@using System.ComponentModel.DataAnnotations
@using SE.PO.CInterface.Enums
@inject INotificationService Notice
<Form
    Model="@Model"
    Style="margin-top: 8px;"
    OnFinish="OnFinish"
    OnFinishFailed="OnFinishFailed"
    @ref="@Form">

    <Row Gutter="24">
        <GridCol Span="12">
            <FormItem Label="下级SCID" LabelCol="_formItemLayout.LabelCol" WrapperCol="_formItemLayout.WrapperCol">
                 <Input Style="width: 220px;" Placeholder="SC编码，下级SCID" @bind-Value="@context.ScId"/>
            </FormItem>
        </GridCol>
        <GridCol Span="12">
            <FormItem Label="设备编号" LabelCol="_formItemLayout.LabelCol" WrapperCol="_formItemLayout.WrapperCol">
                DisplayOrder
            </FormItem>
        </GridCol>
    </Row>

    <Row Gutter="24">
        <GridCol Span="12">
            <FormItem Label="监控单元资管编码" LabelCol="_formItemLayout.LabelCol" WrapperCol="_formItemLayout.WrapperCol">
                 <Input Style="width: 220px;" Placeholder="监控单元资管编码，Device在资源管理系统中的唯一编码" @bind-Value="@context.DevAssetId"/>
            </FormItem>
        </GridCol>
        <GridCol Span="12">
            <FormItem Required Label="机房" LabelCol="_formItemLayout.LabelCol" WrapperCol="_formItemLayout.WrapperCol">
                <SelectSite Model="@Model"></SelectSite>
            </FormItem>
        </GridCol>
    </Row>

    <Row Gutter="24">
        <GridCol Span="12">
            <FormItem Required Label="站点" LabelCol="_formItemLayout.LabelCol" WrapperCol="_formItemLayout.WrapperCol">
                <SelectRoom Model="@Model"></SelectRoom>
            </FormItem>
        </GridCol>
        <GridCol Span="12">
            <FormItem Required Label="监控单元编号" LabelCol="_formItemLayout.LabelCol" WrapperCol="_formItemLayout.WrapperCol">
                <SelectSU Model="@Model"></SelectSU>
            </FormItem>
        </GridCol>
    </Row>

    <Row Gutter="24">
        <GridCol Span="12">
            <FormItem Label="设备名称" LabelCol="_formItemLayout.LabelCol" WrapperCol="_formItemLayout.WrapperCol">
                 <Input Style="width: 220px;" Placeholder="设备名称" @bind-Value="@context.Equipment"/>
            </FormItem>
        </GridCol>
        <GridCol Span="12">
            <FormItem Label="设备描述" LabelCol="_formItemLayout.LabelCol" WrapperCol="_formItemLayout.WrapperCol">
                 <Input Style="width: 220px;" Placeholder="设备描述" @bind-Value="@context.DeviceDesc"/>
            </FormItem>
        </GridCol>
    </Row>

    <Row Gutter="24">
        <GridCol Span="12">
            <FormItem Label="设备类型" LabelCol="_formItemLayout.LabelCol" WrapperCol="_formItemLayout.WrapperCol">
                <SelectDeviceType Model="@Model" ></SelectDeviceType>
            </FormItem>
        </GridCol>
        <GridCol Span="12">
            <FormItem Label="顺序编号" LabelCol="_formItemLayout.LabelCol" WrapperCol="_formItemLayout.WrapperCol">
                 <Input Style="width: 220px;" Label="顺序编号" @bind-Value="@context.Order"/>
            </FormItem>
        </GridCol>
    </Row>

    <Row Gutter="24">
        <GridCol Span="12">
            <FormItem Label="生产厂家描述" LabelCol="_formItemLayout.LabelCol" WrapperCol="_formItemLayout.WrapperCol">
                 <Input Style="width: 220px;" Placeholder="生产厂家描述" @bind-Value="@context.Productor"/>
            </FormItem>
        </GridCol>
        <GridCol Span="12">
            <FormItem Label="协议版本描述" LabelCol="_formItemLayout.LabelCol" WrapperCol="_formItemLayout.WrapperCol">
                 <Input Style="width: 220px;" Placeholder="协议版本描述" @bind-Value="@context.Version"/>
            </FormItem>
        </GridCol>
    </Row>

    <Row Gutter="24">
        <GridCol Span="12">
            <FormItem Label="投入运行时间" LabelCol="_formItemLayout.LabelCol" WrapperCol="_formItemLayout.WrapperCol">
                 <Input Style="width: 220px;" Placeholder="投入运行时间" @bind-Value="@context.BeginRunTime"/>
            </FormItem>
        </GridCol>
        <GridCol Span="12">
            <FormItem Label="设备型号" LabelCol="_formItemLayout.LabelCol" WrapperCol="_formItemLayout.WrapperCol">
                 <Input Style="width: 220px;" Placeholder="设备型号" @bind-Value="@context.DeviceModel"/>
            </FormItem>
        </GridCol>
    </Row>

    <FormItem Label="资源工程状态" LabelCol="_formItemLayout.LabelCol" WrapperCol="_formItemLayout.WrapperCol">
        <EnumSelect TEnum="NeStatusType?" @bind-Value="@context.LocateNeStatus"/>
    </FormItem>
</Form>